#include "MeshFactory.h"

#include <algorithm>
#include <Misc/Bind.h>
#include <Thread.h>
#include "../ResourceManager.h"

using namespace Stray;
using namespace Stray::Core;
using namespace Stray::Core::Graphics;
using namespace Stray::Resource;

MeshPtr MeshFactory::createMesh(const ResourceID& id)
{
	return MeshPtr(new Mesh(id));
}

MeshPtr MeshFactory::createMesh(const ResourceID& id, const MeshCreationParam& param)
{
	MeshPtr spMesh = createMesh(id);

	spMesh->build(param);

	return spMesh;
}

void MeshFactory::buildMesh(const MeshPtr& spMesh, const MeshCreationParam& param)
{
	spMesh->build(param);
}
